<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  <html xmlns="http://www.w3.org/1999/xhtml">
		<head>
			<!-- template designed by Marco Von Ballmoos -->
			<title>Docs For Class ActionForm</title>
			<link rel="stylesheet" href="../media/stylesheet.css" />
			<meta http-equiv='Content-Type' content='text/html; charset=iso-8859-1'/>
		</head>
		<body>
			<div class="page-body">			
<h2 class="class-name">Class ActionForm</h2>

<a name="sec-description"></a>
<div class="info-box">
	<div class="info-box-title">Description</div>
	<div class="nav-bar">
					<span class="disabled">Description</span> |
															<a href="#sec-method-summary">Methods</a> (<a href="#sec-methods">details</a>)
						
					</div>
	<div class="info-box-body">
        		<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">ActionForm class</p>
<p class="description"><p>An &lt;strong&gt;ActionForm&lt;/strong&gt; is a JavaBean optionally associated with  one or more <div class="src-code"><ol><li><div class="src-line"><span class="src-id">ActionMappings</span></div></li>
</ol></div>. Such a bean will have had its  properties initialized from the corresponding request parameters before the  corresponding <div class="src-code"><ol><li><div class="src-line"><span class="src-id"><a href="../mvc/Action.html">Action</a></span>.<span class="src-id">execute</span></div></li>
</ol></div> method is called.</p><p>When the properties of this bean have been populated, but before the  <div class="src-code"><ol><li><div class="src-line"><span class="src-id">execute</span></div></li>
</ol></div> method of the <div class="src-code"><ol><li><div class="src-line"><span class="src-id"><a href="../mvc/Action.html">Action</a></span></div></li>
</ol></div> is called, this  bean's <div class="src-code"><ol><li><div class="src-line"><a href="../mvc/ActionForm.html#methodvalidate">validate</a></div></li>
</ol></div> method will be called, which gives the bean a  chance to verify that the properties submitted by the user are correct and  valid. If this method finds problems, it returns an error messages object  that encapsulates those problems, and the controller servlet will return  control to the corresponding input form. Otherwise, the  <div class="src-code"><ol><li><div class="src-line"><a href="../mvc/ActionForm.html#methodvalidate">validate</a></div></li>
</ol></div> method returns <div class="src-code"><ol><li><div class="src-line"><span class="src-id">null</span></div></li>
</ol></div>, indicating that  everything is acceptable and the corresponding <div class="src-code"><ol><li><div class="src-line"><span class="src-id"><a href="../mvc/Action.html">Action</a></span>.<span class="src-id">execute</span></div></li>
</ol></div>  method should be called.</p><p>This class must be subclassed in order to be instantiated. Subclasses  should provide property getter and setter methods for all of the bean  properties they wish to expose, plus override any of the public or  protected methods for which they wish to provide modified functionality.</p><p>Because ActionForms are JavaBeans, subclasses should also implement  <div class="src-code"><ol><li><div class="src-line"><span class="src-id">Serializable</span></div></li>
</ol></div>, as required by the JavaBean specification. Some  containers require that an object meet all JavaBean requirements in order  to use the introspection API upon which ActionForms rely.</p><p></p></p>
	<ul class="tags">
				<li><span class="field">author:</span> Jeroen Simons &lt;<a href="mailto:jeroen@melange.nl">jeroen@melange.nl</a>&gt;</li>
				<li><span class="field">copyright:</span> Copyright (c) 2007 Jeroen Simons. All rights reserved</li>
				<li><span class="field">link:</span> <a href="http://www.melange.nl/">http://www.melange.nl/</a></li>
			</ul>
		<p class="notes">
			Located in <a class="field" href="_mvc---action---ActionForm.php.html">/mvc/action/ActionForm.php</a> (line <span class="field">61</span>)
		</p>
		
				
		<pre></pre>
	
			</div>
</div>




	<a name="sec-method-summary"></a>
	<div class="info-box">
		<div class="info-box-title">Method Summary</span></div>
		<div class="nav-bar">
			<a href="#sec-description">Description</a> |
												<span class="disabled">Methods</span> (<a href="#sec-methods">details</a>)
		</div>
		<div class="info-box-body">			
			<div class="method-summary">
																				
												<div class="method-definition">
											<span class="method-result">void</span>
										<a href="#reset" title="details" class="method-name">reset</a>
											(<span class="var-type"><a href="../mvc/ActionConfig.html">ActionConfig</a></span>&nbsp;<span class="var-name">$mapping</span>, <span class="var-type"></span>&nbsp;<span class="var-name">$request</span>)
									</div>
																<div class="method-definition">
											<span class="method-result">The</span>
										<a href="#validate" title="details" class="method-name">validate</a>
											(<span class="var-type"><a href="../mvc/ActionConfig.html">ActionConfig</a></span>&nbsp;<span class="var-name">$mapping</span>, <span class="var-type"></span>&nbsp;<span class="var-name">$request</span>)
									</div>
								</div>
		</div>
	</div>		

	
	<a name="sec-methods"></a>
	<div class="info-box">
		<div class="info-box-title">Methods</div>
		<div class="nav-bar">
			<a href="#sec-description">Description</a> |
																<a href="#sec-method-summary">Methods</a> (<span class="disabled">details</span>)
						
		</div>
		<div class="info-box-body">
			<A NAME='method_detail'></A>

<a name="methodreset" id="reset"><!-- --></a>
<div class="oddrow">
	
	<div class="method-header">
		<span class="method-title">reset</span> (line <span class="line-number">91</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">&lt;p&gt;Can be used to reset bean properties to their default state, as needed.  This method is called before the properties are repopulated by the controller.&lt;/p&gt;</p>
<p class="description"><p>The default implementation does nothing. In practice, the only  properties that need to be reset are those which represent checkboxes  on a session-scoped form. Otherwise, properties can be given initial  values where the field is declared.</p><p>If the form is stored in session-scope so that values can be  collected over multiple requests (a &quot;wizard&quot;), you must be very careful  of which properties, if any, are reset. As mentioned, session-scope  checkboxes must be reset to false for any page where this property is  set. This is because the client does not submit a checkbox value when  it is clear (false). If a session-scoped checkbox is not proactively  reset, it can never be set to false.</p><p>This method is &lt;strong&gt;not&lt;/strong&gt; the appropriate place to  initialize form value for an &quot;update&quot; type page (this should be done in  a setup Action). You mainly need to worry about setting checkbox values  to false; most of the time you can leave this method unimplemented.</p><p></p></p>
	<ul class="tags">
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">void</span>
		<span class="method-name">
			reset
		</span>
					(<span class="var-type"><a href="../mvc/ActionConfig.html">ActionConfig</a></span>&nbsp;<span class="var-name">$mapping</span>, <span class="var-type"></span>&nbsp;<span class="var-name">$request</span>)
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type">mapping</span>
				<span class="var-name">$mapping</span><span class="var-description">: The mapping used to select this instance</span>			</li>
					<li>
				<span class="var-type">request</span>
				<span class="var-name">$request</span><span class="var-description">: The servlet request we are processing</span>			</li>
				</ul>
		
			
	</div>
<a name="methodvalidate" id="validate"><!-- --></a>
<div class="evenrow">
	
	<div class="method-header">
		<span class="method-title">validate</span> (line <span class="line-number">113</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">&lt;p&gt;Can be used to validate the properties that have been set for this</p>
<p class="description"><p>HTTP request, and return an <div class="src-code"><ol><li><div class="src-line"><span class="src-id">ActionErrors</span></div></li>
</ol></div> object that  encapsulates any validation errors that have been found. If no errors  are found, return <div class="src-code"><ol><li><div class="src-line"><span class="src-id">null</span></div></li>
</ol></div> or an <div class="src-code"><ol><li><div class="src-line"><span class="src-id">ActionErrors</span></div></li>
</ol></div>  object with no recorded error messages.&lt;/p&gt;</p><p>&lt;p&gt;The default implementation performs no validation and returns  <div class="src-code"><ol><li><div class="src-line"><span class="src-id">null</span></div></li>
</ol></div>. Subclasses must override this method to provide any  validation they wish to perform.&lt;/p&gt;</p></p>
	<ul class="tags">
				<li><span class="field">return:</span> set of validation errors, if validation failed; an empty          set or <div class="src-code"><ol><li><div class="src-line"><span class="src-id">null</span></div></li>
</ol></div> if validation succeeded.</li>
				<li><span class="field">see:</span> DynaActionForm</li>
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">The</span>
		<span class="method-name">
			validate
		</span>
					(<span class="var-type"><a href="../mvc/ActionConfig.html">ActionConfig</a></span>&nbsp;<span class="var-name">$mapping</span>, <span class="var-type"></span>&nbsp;<span class="var-name">$request</span>)
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type">mapping</span>
				<span class="var-name">$mapping</span><span class="var-description">: The mapping used to select this instance</span>			</li>
					<li>
				<span class="var-type">request</span>
				<span class="var-name">$request</span><span class="var-description">: The servlet request we are processing</span>			</li>
				</ul>
		
			
	</div>
						
		</div>
	</div>


	<p class="notes" id="credit">
		Documentation generated on Sun, 10 Feb 2008 15:16:13 +0200 by <a href="http://www.phpdoc.org" target="_blank">phpDocumentor 1.4.0</a>
	</p>
	</div></body>
</html>